package com.sx.zongzhi.presenter;

import com.sx.zongzhi.MyApplication;
import com.sx.zongzhi.bean.EducationBean;
import com.sx.zongzhi.modle.ApiManager;
import com.sx.zongzhi.net.BaseCallBack;
import com.sx.zongzhi.net.BaseResult;
import com.sx.zongzhi.view.IEducationView;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by XZY on 2017/12/4.
 * 获取学历
 */
public class EducationPest {

    private IEducationView educationView;

    public EducationPest(IEducationView educationView) {
        this.educationView=educationView;
    }


    public void getEducationList(){
        Map<String,Object> map=new HashMap<>();
        map.put("sid", MyApplication.sid);

        new ApiManager().getEducationList(map, new BaseCallBack<BaseResult<List<EducationBean>>>() {
            @Override
            public void onSuccess(BaseResult<List<EducationBean>> response) {
                educationView.getEducationList(response.getData());
            }
            @Override
            public void onFailures(String message) {
                educationView.showError(message);
            }
        });
    }

}
